3.538 \(\int \frac{\tanh ^{-1}(c x) (a+b \tanh ^{-1}(c x))}{(1+c x)^2} \, dx\)

Optimal. Leaf size=78 \[ -\frac{a+b}{2 c (c x+1)}+\frac{(a+b) \tanh ^{-1}(c x)}{2 c}-\frac{(a+b) \tanh ^{-1}(c x)}{c (c x+1)}-\frac{b (1-c x) \tanh ^{-1}(c x)^2}{2 c (c x+1)} \]

[Out]

-(a + b)/(2*c*(1 + c*x)) + ((a + b)*ArcTanh[c*x])/(2*c) - ((a + b)*ArcTanh[c*x])/(c*(1 + c*x)) - (b*(1 - c*x)*
ArcTanh[c*x]^2)/(2*c*(1 + c*x))

________________________________________________________________________________________

Rubi [A]  time = 0.293258, antiderivative size = 122, normalized size of antiderivative = 1.56, number of steps used = 16, number of rules used = 7, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.35, Rules used = {5926, 627, 44, 207, 6742, 5928, 5948} \[ -\frac{a}{2 c (c x+1)}+\frac{a \tanh ^{-1}(c x)}{2 c}-\frac{a \tanh ^{-1}(c x)}{c (c x+1)}-\frac{b}{2 c (c x+1)}+\frac{b \tanh ^{-1}(c x)^2}{2 c}-\frac{b \tanh ^{-1}(c x)^2}{c (c x+1)}+\frac{b \tanh ^{-1}(c x)}{2 c}-\frac{b \tanh ^{-1}(c x)}{c (c x+1)} \]

Antiderivative was successfully verified.

[In]

Int[(ArcTanh[c*x]*(a + b*ArcTanh[c*x]))/(1 + c*x)^2,x]

[Out]

-a/(2*c*(1 + c*x)) - b/(2*c*(1 + c*x)) + (a*ArcTanh[c*x])/(2*c) + (b*ArcTanh[c*x])/(2*c) - (a*ArcTanh[c*x])/(c
*(1 + c*x)) - (b*ArcTanh[c*x])/(c*(1 + c*x)) + (b*ArcTanh[c*x]^2)/(2*c) - (b*ArcTanh[c*x]^2)/(c*(1 + c*x))

Rule 5926

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))*((d_) + (e_.)*(x_))^(q_.), x_Symbol] :> Simp[((d + e*x)^(q + 1)*(a + b
*ArcTanh[c*x]))/(e*(q + 1)), x] - Dist[(b*c)/(e*(q + 1)), Int[(d + e*x)^(q + 1)/(1 - c^2*x^2), x], x] /; FreeQ
[{a, b, c, d, e, q}, x] && NeQ[q, -1]

Rule 627

Int[((d_) + (e_.)*(x_))^(m_.)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[(d + e*x)^(m + p)*(a/d + (c*x)/e)^
p, x] /; FreeQ[{a, c, d, e, m, p}, x] && EqQ[c*d^2 + a*e^2, 0] && (IntegerQ[p] || (GtQ[a, 0] && GtQ[d, 0] && I
ntegerQ[m + p]))

Rule 44

Int[((a_) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*
x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && L
tQ[m + n + 2, 0])

Rule 207

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTanh[(Rt[b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 6742

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rule 5928

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_)*((d_) + (e_.)*(x_))^(q_.), x_Symbol] :> Simp[((d + e*x)^(q + 1)*(
a + b*ArcTanh[c*x])^p)/(e*(q + 1)), x] - Dist[(b*c*p)/(e*(q + 1)), Int[ExpandIntegrand[(a + b*ArcTanh[c*x])^(p
 - 1), (d + e*x)^(q + 1)/(1 - c^2*x^2), x], x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 1] && IntegerQ[q] &
& NeQ[q, -1]

Rule 5948

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)^2), x_Symbol] :> Simp[(a + b*ArcTanh[c*x])^(p
 + 1)/(b*c*d*(p + 1)), x] /; FreeQ[{a, b, c, d, e, p}, x] && EqQ[c^2*d + e, 0] && NeQ[p, -1]

Rubi steps

\begin{align*} \int \frac{\tanh ^{-1}(c x) \left (a+b \tanh ^{-1}(c x)\right )}{(1+c x)^2} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{\tanh ^{-1}(x) \left (a+b \tanh ^{-1}(x)\right )}{(1+x)^2} \, dx,x,c x\right )}{c}\\ &=\frac{\operatorname{Subst}\left (\int \left (\frac{a \tanh ^{-1}(x)}{(1+x)^2}+\frac{b \tanh ^{-1}(x)^2}{(1+x)^2}\right ) \, dx,x,c x\right )}{c}\\ &=\frac{a \operatorname{Subst}\left (\int \frac{\tanh ^{-1}(x)}{(1+x)^2} \, dx,x,c x\right )}{c}+\frac{b \operatorname{Subst}\left (\int \frac{\tanh ^{-1}(x)^2}{(1+x)^2} \, dx,x,c x\right )}{c}\\ &=-\frac{a \tanh ^{-1}(c x)}{c (1+c x)}-\frac{b \tanh ^{-1}(c x)^2}{c (1+c x)}+\frac{a \operatorname{Subst}\left (\int \frac{1}{(1+x) \left (1-x^2\right )} \, dx,x,c x\right )}{c}+\frac{(2 b) \operatorname{Subst}\left (\int \left (\frac{\tanh ^{-1}(x)}{2 (1+x)^2}-\frac{\tanh ^{-1}(x)}{2 \left (-1+x^2\right )}\right ) \, dx,x,c x\right )}{c}\\ &=-\frac{a \tanh ^{-1}(c x)}{c (1+c x)}-\frac{b \tanh ^{-1}(c x)^2}{c (1+c x)}+\frac{a \operatorname{Subst}\left (\int \frac{1}{(1-x) (1+x)^2} \, dx,x,c x\right )}{c}+\frac{b \operatorname{Subst}\left (\int \frac{\tanh ^{-1}(x)}{(1+x)^2} \, dx,x,c x\right )}{c}-\frac{b \operatorname{Subst}\left (\int \frac{\tanh ^{-1}(x)}{-1+x^2} \, dx,x,c x\right )}{c}\\ &=-\frac{a \tanh ^{-1}(c x)}{c (1+c x)}-\frac{b \tanh ^{-1}(c x)}{c (1+c x)}+\frac{b \tanh ^{-1}(c x)^2}{2 c}-\frac{b \tanh ^{-1}(c x)^2}{c (1+c x)}+\frac{a \operatorname{Subst}\left (\int \left (\frac{1}{2 (1+x)^2}-\frac{1}{2 \left (-1+x^2\right )}\right ) \, dx,x,c x\right )}{c}+\frac{b \operatorname{Subst}\left (\int \frac{1}{(1+x) \left (1-x^2\right )} \, dx,x,c x\right )}{c}\\ &=-\frac{a}{2 c (1+c x)}-\frac{a \tanh ^{-1}(c x)}{c (1+c x)}-\frac{b \tanh ^{-1}(c x)}{c (1+c x)}+\frac{b \tanh ^{-1}(c x)^2}{2 c}-\frac{b \tanh ^{-1}(c x)^2}{c (1+c x)}-\frac{a \operatorname{Subst}\left (\int \frac{1}{-1+x^2} \, dx,x,c x\right )}{2 c}+\frac{b \operatorname{Subst}\left (\int \frac{1}{(1-x) (1+x)^2} \, dx,x,c x\right )}{c}\\ &=-\frac{a}{2 c (1+c x)}+\frac{a \tanh ^{-1}(c x)}{2 c}-\frac{a \tanh ^{-1}(c x)}{c (1+c x)}-\frac{b \tanh ^{-1}(c x)}{c (1+c x)}+\frac{b \tanh ^{-1}(c x)^2}{2 c}-\frac{b \tanh ^{-1}(c x)^2}{c (1+c x)}+\frac{b \operatorname{Subst}\left (\int \left (\frac{1}{2 (1+x)^2}-\frac{1}{2 \left (-1+x^2\right )}\right ) \, dx,x,c x\right )}{c}\\ &=-\frac{a}{2 c (1+c x)}-\frac{b}{2 c (1+c x)}+\frac{a \tanh ^{-1}(c x)}{2 c}-\frac{a \tanh ^{-1}(c x)}{c (1+c x)}-\frac{b \tanh ^{-1}(c x)}{c (1+c x)}+\frac{b \tanh ^{-1}(c x)^2}{2 c}-\frac{b \tanh ^{-1}(c x)^2}{c (1+c x)}-\frac{b \operatorname{Subst}\left (\int \frac{1}{-1+x^2} \, dx,x,c x\right )}{2 c}\\ &=-\frac{a}{2 c (1+c x)}-\frac{b}{2 c (1+c x)}+\frac{a \tanh ^{-1}(c x)}{2 c}+\frac{b \tanh ^{-1}(c x)}{2 c}-\frac{a \tanh ^{-1}(c x)}{c (1+c x)}-\frac{b \tanh ^{-1}(c x)}{c (1+c x)}+\frac{b \tanh ^{-1}(c x)^2}{2 c}-\frac{b \tanh ^{-1}(c x)^2}{c (1+c x)}\\ \end{align*}

Mathematica [A]  time = 0.0815359, size = 70, normalized size = 0.9 \[ -\frac{(a+b) ((c x+1) \log (1-c x)-(c x+1) \log (c x+1)+2)+4 (a+b) \tanh ^{-1}(c x)-2 b (c x-1) \tanh ^{-1}(c x)^2}{4 c (c x+1)} \]

Antiderivative was successfully verified.

[In]

Integrate[(ArcTanh[c*x]*(a + b*ArcTanh[c*x]))/(1 + c*x)^2,x]

[Out]

-(4*(a + b)*ArcTanh[c*x] - 2*b*(-1 + c*x)*ArcTanh[c*x]^2 + (a + b)*(2 + (1 + c*x)*Log[1 - c*x] - (1 + c*x)*Log
[1 + c*x]))/(4*c*(1 + c*x))

________________________________________________________________________________________

Maple [B]  time = 0.063, size = 247, normalized size = 3.2 \begin{align*} -{\frac{a{\it Artanh} \left ( cx \right ) }{c \left ( cx+1 \right ) }}-{\frac{a\ln \left ( cx-1 \right ) }{4\,c}}-{\frac{a}{2\,c \left ( cx+1 \right ) }}+{\frac{a\ln \left ( cx+1 \right ) }{4\,c}}-{\frac{b \left ({\it Artanh} \left ( cx \right ) \right ) ^{2}}{c \left ( cx+1 \right ) }}-{\frac{b{\it Artanh} \left ( cx \right ) \ln \left ( cx-1 \right ) }{2\,c}}-{\frac{b{\it Artanh} \left ( cx \right ) }{c \left ( cx+1 \right ) }}+{\frac{b{\it Artanh} \left ( cx \right ) \ln \left ( cx+1 \right ) }{2\,c}}-{\frac{b \left ( \ln \left ( cx-1 \right ) \right ) ^{2}}{8\,c}}+{\frac{b\ln \left ( cx-1 \right ) }{4\,c}\ln \left ({\frac{1}{2}}+{\frac{cx}{2}} \right ) }-{\frac{b\ln \left ( cx-1 \right ) }{4\,c}}-{\frac{b}{2\,c \left ( cx+1 \right ) }}+{\frac{b\ln \left ( cx+1 \right ) }{4\,c}}-{\frac{b}{4\,c}\ln \left ( -{\frac{cx}{2}}+{\frac{1}{2}} \right ) \ln \left ({\frac{1}{2}}+{\frac{cx}{2}} \right ) }+{\frac{b\ln \left ( cx+1 \right ) }{4\,c}\ln \left ( -{\frac{cx}{2}}+{\frac{1}{2}} \right ) }-{\frac{b \left ( \ln \left ( cx+1 \right ) \right ) ^{2}}{8\,c}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(arctanh(c*x)*(a+b*arctanh(c*x))/(c*x+1)^2,x)

[Out]

-a*arctanh(c*x)/c/(c*x+1)-1/4*a/c*ln(c*x-1)-1/2*a/c/(c*x+1)+1/4*a/c*ln(c*x+1)-b*arctanh(c*x)^2/c/(c*x+1)-1/2/c
*b*arctanh(c*x)*ln(c*x-1)-b*arctanh(c*x)/c/(c*x+1)+1/2/c*b*arctanh(c*x)*ln(c*x+1)-1/8/c*b*ln(c*x-1)^2+1/4/c*b*
ln(c*x-1)*ln(1/2+1/2*c*x)-1/4/c*b*ln(c*x-1)-1/2*b/c/(c*x+1)+1/4/c*b*ln(c*x+1)-1/4/c*b*ln(-1/2*c*x+1/2)*ln(1/2+
1/2*c*x)+1/4/c*b*ln(-1/2*c*x+1/2)*ln(c*x+1)-1/8/c*b*ln(c*x+1)^2

________________________________________________________________________________________

Maxima [C]  time = 1.21555, size = 305, normalized size = 3.91 \begin{align*} -\frac{1}{8} \,{\left (b c{\left (\frac{2}{c^{4} x + c^{3}} - \frac{\log \left (c x + 1\right )}{c^{3}} + \frac{\log \left (c x - 1\right )}{c^{3}}\right )} + 2 \, a{\left (\frac{2}{c^{3} x + c^{2}} - \frac{\log \left (c x + 1\right )}{c^{2}} + \frac{\log \left (c x - 1\right )}{c^{2}}\right )} + \frac{-2 i \, \pi b +{\left (i \, \pi b +{\left (i \, \pi b c - b c\right )} x + b\right )} \log \left (c x + 1\right ) +{\left (-i \, \pi b +{\left (-i \, \pi b c + b c\right )} x - b\right )} \log \left (c x - 1\right ) + 2 \, b}{c^{3} x + c^{2}}\right )} c - \frac{1}{4} \,{\left ({\left (c{\left (\frac{2}{c^{3} x + c^{2}} - \frac{\log \left (c x + 1\right )}{c^{2}} + \frac{\log \left (c x - 1\right )}{c^{2}}\right )} + \frac{4 \, \operatorname{artanh}\left (c x\right )}{c^{2} x + c}\right )} b + \frac{4 \, a}{c^{2} x + c}\right )} \operatorname{artanh}\left (c x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(arctanh(c*x)*(a+b*arctanh(c*x))/(c*x+1)^2,x, algorithm="maxima")

[Out]

-1/8*(b*c*(2/(c^4*x + c^3) - log(c*x + 1)/c^3 + log(c*x - 1)/c^3) + 2*a*(2/(c^3*x + c^2) - log(c*x + 1)/c^2 +
log(c*x - 1)/c^2) + (-2*I*pi*b + (I*pi*b + (I*pi*b*c - b*c)*x + b)*log(c*x + 1) + (-I*pi*b + (-I*pi*b*c + b*c)
*x - b)*log(c*x - 1) + 2*b)/(c^3*x + c^2))*c - 1/4*((c*(2/(c^3*x + c^2) - log(c*x + 1)/c^2 + log(c*x - 1)/c^2)
 + 4*arctanh(c*x)/(c^2*x + c))*b + 4*a/(c^2*x + c))*arctanh(c*x)

________________________________________________________________________________________

Fricas [A]  time = 1.92193, size = 166, normalized size = 2.13 \begin{align*} \frac{{\left (b c x - b\right )} \log \left (-\frac{c x + 1}{c x - 1}\right )^{2} + 2 \,{\left ({\left (a + b\right )} c x - a - b\right )} \log \left (-\frac{c x + 1}{c x - 1}\right ) - 4 \, a - 4 \, b}{8 \,{\left (c^{2} x + c\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(arctanh(c*x)*(a+b*arctanh(c*x))/(c*x+1)^2,x, algorithm="fricas")

[Out]

1/8*((b*c*x - b)*log(-(c*x + 1)/(c*x - 1))^2 + 2*((a + b)*c*x - a - b)*log(-(c*x + 1)/(c*x - 1)) - 4*a - 4*b)/
(c^2*x + c)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\left (a + b \operatorname{atanh}{\left (c x \right )}\right ) \operatorname{atanh}{\left (c x \right )}}{\left (c x + 1\right )^{2}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(atanh(c*x)*(a+b*atanh(c*x))/(c*x+1)**2,x)

[Out]

Integral((a + b*atanh(c*x))*atanh(c*x)/(c*x + 1)**2, x)

________________________________________________________________________________________

Giac [A]  time = 1.18259, size = 138, normalized size = 1.77 \begin{align*} \frac{1}{8} \,{\left (\frac{b}{c} - \frac{2 \, b}{{\left (c x + 1\right )} c}\right )} \log \left (\frac{1}{\frac{2}{c x + 1} - 1}\right )^{2} - \frac{{\left (a + b\right )} \log \left (-\frac{2}{c x + 1} + 1\right )}{4 \, c} - \frac{{\left (a + b\right )} \log \left (\frac{1}{\frac{2}{c x + 1} - 1}\right )}{2 \,{\left (c x + 1\right )} c} - \frac{a + b}{2 \,{\left (c x + 1\right )} c} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(arctanh(c*x)*(a+b*arctanh(c*x))/(c*x+1)^2,x, algorithm="giac")

[Out]

1/8*(b/c - 2*b/((c*x + 1)*c))*log(1/(2/(c*x + 1) - 1))^2 - 1/4*(a + b)*log(-2/(c*x + 1) + 1)/c - 1/2*(a + b)*l
og(1/(2/(c*x + 1) - 1))/((c*x + 1)*c) - 1/2*(a + b)/((c*x + 1)*c)